﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Xml.Linq;

namespace MensUnoShop.Models
{
    public class AD
    {
        private XElement _xindex, _x650, _x274;
        public XElement XINDEX { private set { _xindex = value; } get { return _xindex; } }
        public XElement X650 { private set { _x650 = value; } get { return _x650; } }
        public XElement X274 { private set { _x274 = value; } get { return _x274; } }
        public AD()
        {
            string path = System.Configuration.ConfigurationManager.AppSettings["AdConfig"].ToString();
            using (System.IO.StreamReader sr = new System.IO.StreamReader(path))
            {
                XElement xroot = XElement.Load(sr);
                _xindex = xroot.Element("adindex");
                _x650 = xroot.Element("ad650");
                _x274 = xroot.Element("ad274");
            }
        }
    }
}